﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace GH.Web.Frame
{
    public partial class left_4 : GH.Web.BasePage.PageBase
    {
        public bool mIsUserRight = false;
        public bool mIsRoleRight = false;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                //角色权限
                if (!GetRight(105))
                {
                    this.TreeView1.Nodes.RemoveAt(2);
                }
                //用户权限
                if (!GetRight(104))
                {
                    this.TreeView1.Nodes.RemoveAt(1);
                }

            }
            
        }
        protected void TreeView1_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
        {
            if (e.Node.ChildNodes.Count != 0)
            {
                e.Node.ImageUrl = "~/Images/open.gif";
            }

        }
        protected void TreeView1_TreeNodeCollapsed(object sender, TreeNodeEventArgs e)
        {
            e.Node.ImageUrl = "~/Images/closed.gif";
        }
    }
}
